package com.zte.common.control;

import com.zte.common.service.CommonBrandTypeProductService;
import com.zte.util.ResultMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CacheConfig(cacheNames = "brandTypeProduct")
public class BrandTypeProductAction {
    @Autowired
    private CommonBrandTypeProductService brandTypeProductService;

    @Cacheable
    @GetMapping("/queryBrandTypeProductFirmInfo")
    public ResultMessage queryBrandTypeProductFirmInfo(){
        return new ResultMessage(200,true,"获取成功",brandTypeProductService.queryBrandTypeProductFirmInfo());
    }

    @Cacheable
    @GetMapping("/brandTypeProduct")
    public ResultMessage getbrandTypeProduct(){
        return new ResultMessage(200,true,"获取成功",brandTypeProductService.getBrandTypeProductInfo());
    }

    @Cacheable
    @GetMapping("/getBrandType")
    public ResultMessage getBrandType(){
        return new ResultMessage(200,true,"获取成功",brandTypeProductService.queryBrandTypeInfo());
    }
}
